{include file="public/head" /}
{include file="public/js_ueditor" /}
<link rel="stylesheet" href="{:config('template.skin')}/bootstrap-select/bootstrap-select.min.css">
<!--有理想的地方，地狱都是天堂-->
<!--Copyright @ df81.com 版权所有-->
<!--作者: 南国老符 邮箱：1062129401@qq.com-->
<link href="{:config('template.skin')}/css/sku.css" rel="stylesheet" />
<link href="{:config('template.skin')}/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{:config('template.skin')}/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
        <!-- 左侧菜单 开始 -->
        <div class="sidebar">
            <nav>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_content" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_data" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_global" /}
                </ul>
                <ul class="nav nav-pills nav-sidebar flex-column nav-flat nav-legacy d-block d-md-none" data-widget="treeview" role="menu" data-accordion="false">
                    {include file="public/left_system" /}
                </ul>
            </nav>
        </div>
        <!-- 左侧菜单 结束 -->
    </aside>
    <!-- 左侧 结束 -->
    <!-- 右侧 开始 -->
    <div class="content-wrapper">
        <!-- 内容导航 开始 -->
        <div class="content-header py-2 bg-white mb-3">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-12">
                        <ol class="breadcrumb">
                            <li>{:lang('v_home')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{$mRs.title} {:lang('v_manage')}<i class="fas fa-angle-right mx-2"></i></li>
                            <li>{empty name="rs.id"}{:lang('v_add')}{else /}{:lang('v_edit')}{/empty} {$mRs.title}</li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <!-- 内容导航 结束 -->
        <!-- 内容主体 开始 -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12">
                        <div class="w-100 pt-3 pb-2 bg-white rounded mb-3">
                            <form name="form_keyword" action="{:url('/video/index',['lang'=>$lang,'tabledir'=>$tabledir,'signid'=>1])}" method="post" class="row">
                                <input type="hidden" name="lang" value="{$lang}">
                                <input type="hidden" name="tabledir" value="{$tabledir}">
                                <div class="col-md-8">
                                    <a class="btn mb-2 mr-2 btn-default" href="{:url('/video/index',['lang'=>input('lang'),'tabledir'=>input('tabledir'),'signid'=>1])}"><i class="fa fa-fw fa-list-ul mr-1"></i>{$mRs.title} {:lang('v_manage')}</a>
                                    <a class="btn mb-2 mr-2 btn-default" href="{:url('/video/index',['lang'=>input('lang'),'tabledir'=>input('tabledir'),'signid'=>9])}"><i class="fa fa-fw fa-recycle mr-1"></i>{:lang('v_recycle')}</a>
                                    <a class="btn mb-2 btn-success" href="{:url('/video/edit',['lang'=>input('lang'),'tabledir'=>input('tabledir')])}"><i class="fa fa-fw fa-plus-circle mr-1"></i>{:lang('v_add')} {$mRs.title}</a>
                                </div>
                                <div class="col-md-4">
                                    <div class="input-group">
                                        <input name="keyword" placeholder="{:lang('v_quickfind')}" type="text" class="form-control">
                                        <span class="input-group-append">
                                            <button type="submit" class="btn btn-success"><i class="fa fa-search mr-1"></i>{:lang('v_search')}</button>
                                        </span>
                                    </div>
                                </div>
                            </form>
                        </div>
                        {php}$isdisplay_array=explode(',',$navModuleRs['isdisplay']);{/php}
                        <div class="card card-outline card-success card-outline-tabs border-top-0">
                            <div class="card-header p-0">
                                <div class="float-left nav-link"><i class="fa fa-edit mr-1"></i>{empty name="rs.id"}{:lang('v_add')}{else /}{:lang('v_edit')}{/empty} {$mRs.title}</div>
                                <ul class="nav nav-tabs border-bottom-0 float-right">
                                    <li class="nav-item">
                                        <a class="nav-link active" data-toggle="pill" href="#tab_general">{:lang('v_basic')}</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link" data-toggle="pill" href="#tab_extend">{:lang('v_extend')}</a>
                                    </li>
                                    {in name="'attribute'" value="$isdisplay_array"}
                                        <li class="nav-item"><a class="nav-link" data-toggle="pill" href="#tab_attribute">{:lang('v_attribute')}</a></li>
                                    {/in}
                                </ul>
                            </div>
                            <div class="card-body">
                                <form name="form_edit" id="form_edit" method="post" action="{:url('/'.$tabledir.'/edit',['lang'=>$lang,'id'=>$rs['id'],'tabledir'=>$tabledir])}">
                                    <input type="hidden" name="id" value="{$rs.id}">
                                    <input type="hidden" name="lang" value="{$lang}">
                                    <input type="hidden" name="tabledir" value="{$tabledir}">
                                    <input type="hidden" name="attvalue" value="{$rs.attvalue}">
                                    <input type="hidden" name="thumb">
                                    <input type="hidden" name="morefileurl">
                                    <input type="hidden" name="sortid">
                                    <input type="hidden" name="cityid">
                                    <input type="hidden" name="brandid">
                                    <div class="tab-content">
                                        <div class="tab-pane active" id="tab_general">
                                            <div class="row form-group {notin name="'sort'" value="$isdisplay_array"}d-none{/notin}">
                                                <div class="col-md-3 col-form-label text-right text-danger">{:lang('v_sort')} *</div>
                                                <div class="col-md-5">
                                                    {eq name="mRs.sort_style" value="1"}
                                                        <select name="sortid" id="sortid" class="form-control">
                                                            {in name="'sort'" value="$isdisplay_array"}<option value="" {empty name="rs.id"}selected="selected"{/empty}>{:lang('v_sort_check')}</option>{/in}
                                                            {foreach name="sort" item="k"}
                                                                <option value="{$k.id}" {eq name="rs.sortid" value="$k.id" }selected="selected"{/eq}>{$k.html} {$k.title}</option>
                                                            {/foreach}
                                                        </select>
                                                        <input type="hidden" name="tree_title" id="tree_title" value="{$tree_title}">
                                                    {else /}
                                                        <select name="sortid[]" class="selectpicker form-control" multiple data-live-search="true" title="请选择分类">
                                                            {foreach name="sort" item="k"}
                                                                <option value="{$k.id}" {if in_array($k['id'],explode(',',$rs['sortid']))}selected="selected"{/if}>{$k.html} {$k.title}</option>
                                                            {/foreach}
                                                        </select>
                                                        <input type="hidden" name="tree_title" id="tree_title" value="{$tree_title}">
                                                        <!-- <div class="input-group">
                                                            <input name="tree_title" id="tree_title" type="text" class="form-control" value="{$tree_title}" readonly="yes" />
                                                            <a class="input-group-append" href="{:url('/sort/index',['lang'=>$lang,'tabledir'=>$tabledir,'from'=>'sort','parentid'=>$rs['sortid']])}" data-target="#modal" data-toggle="modal">
                                                                <span class="btn btn-success">{:lang('v_select')} {:lang('v_sort')}</span>
                                                            </a>
                                                        </div>
                                                        <input type="hidden" name="sortid" id="checkid" value="{$rs.sortid}"> -->
                                                    {/eq}
                                                </div>
                                            </div>
                                            {include file="public/js_edit_title" /}
                                            {include file="public/js_media_upload" /}
                                            <div class="row form-group {if !in_array('onecontent',$isdisplay_array)}d-none{/if}">
                                                <div class="col-md-3 text-right">{:lang('v_content_a')}</div>
                                                <div class="col-md-9">
                                                    <textarea name="content1" id="content1a" style="width:100%; height:350px;">{$rs.content1}</textarea>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="tab-pane" id="tab_extend">
                                            {include file="public/html_brand" /}
                                            {include file="public/js_edit_area" /}
                                            {include file="public/js_edit_price" /}
                                            {include file="public/js_edit_other" /}
                                        </div>
                                        <div class="tab-pane" id="tab_attribute">
                                            {include file="public/js_edit_attribute" /}
                                        </div>
                                        {include file="public/js_edit_submit" /}
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- 内容主体 结束 -->
    </div>
    <!-- 右侧 结束 -->
{include file="public/foot" /}
<script type="text/javascript">
// 是否选中免费
function price_arr_choice(price_arr_flag,price_arr){
    if($(price_arr_flag).is(':checked')){
        $(price_arr).val(1);
    }else{
        $(price_arr).val(0);
    }
}
</script>
{include file="public/js_color_picker" /}
{include file="public/js_pinyin" /}
{include file="public/js_datetime_picker" /}
<script type="text/plain" id="input_editor" style="display:none;"></script>
{include file="public/js_upload_img" /}
{include file="public/js_upload_file" /}
{include file="public/js_more_media" /}
{include file="public/js_rich_text" /}
{include file="public/js_edit_file" /}
<script src="{:config('template.skin')}/bootstrap-select/bootstrap-select.min.js"></script>
<script src="{:config('template.skin')}/bootstrap-select/defaults-zh_CN.min.js"></script>
</body>
</html>